﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace PolePositionMobile.Entities
{
    public class EBaseLookup
    {
        private Int32 m_Id;
        private string m_Name;

        public Int32 Id
        {
            get
            {
                return m_Id;
            }
            set
            {
                m_Id = value;
            }
        }
        public string Name
        {
            get
            {
                return m_Name;
            }
            set
            {
                m_Name = value;
            }
        }

        #region Constructor
        public EBaseLookup()
        {
            m_Id = Int32.MinValue;
            m_Name = string.Empty;
        }

        public EBaseLookup(Int32 id)
            : this()
        {
            m_Id = id;
        }
        public EBaseLookup(Int32 Id, string name)
            : this(Id)
        {
            m_Name = name;
        }


        #endregion


        public override bool Equals(object obj)
        {
            EBaseLookup tmp;
            if (obj is EBaseLookup)
            {
                tmp = (EBaseLookup)obj;
                return (tmp.Id == Id);
            }
            else
            {
                return false;
            }
        }


    }
}
